export default function(instance, callback) {
	if (instance.$myData.avatarUrl) {
		console.log('has');
		return
	}
	let that = instance
	uni.getUserProfile({
		desc: "weixin", // 指明用途,这个参数是必须的
		success: (res) => {
			that.$myData.nickName = res.userInfo.nickName
			that.$myData.avatarUrl = res.userInfo.avatarUrl
			callback & callback()
		}
	})
	uni.getUserInfo({
		success: function(res) {
			that.$myData.iv = res.iv
			that.$myData.signature = res.signature
		}
	})
}
